Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#02: The Medium Clap (with useClapAnimation) #16

Open
wants to merge 3 commits into
base: 01
Choose a base branch
from
Open

#02: The Medium Clap (with useClapAnimation) #16

wants to merge 3 commits into from

Conversation

ohansemmanuel
Copy link
Owner

@ohansemmanuel ohansemmanuel commented Oct 28, 2019

What is this PR about? 🤔

A refactor from #1 - from class component to functional component (with hooks)

Changes 🎁

  • Animate the clap via the hook, useClapAnimation as opposed to a Higher-Order Component
  • Use a callback ref to hold DOM elements being animated

Before/After 📸

👉https://advanced-react-patterns-ultrasimplified.netlify.com/the-medium-clap

Other comments 💬

Note how the Usage of the component is now simplified:

https://i.imgur.com/Uc6WZWm.png

@ohansemmanuel ohansemmanuel changed the title #02 use hooks #02: The Medium Clap (with useClapAnimation) Oct 28, 2019
@ohansemmanuel ohansemmanuel mentioned this pull request Dec 31, 2019
1 task
@ohansemmanuel ohansemmanuel mentioned this pull request Feb 15, 2020
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant